const article = require('../model/article');
class UPload{
    /* 保存文件名字 */
    async submitarticle_corve(article_id,file_name){
        let res=await article.update({ article_cover: file_name }, {
            where: {
              id: article_id
            }
        });
        if (res[0] > 0) {
            return {
                code:1,
                msg:'修改成功'
            }
        } else {
            return {
                code:0,
                msg:"修改失败"
            }
        }
    }
} 
module.exports = new UPload();